﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ManageYTDACTUploadExcel.ascx.vb"
    Inherits="WebForm_ManageTCUploadExcel_ManageYTDACTUploadExcel" %>

<script runat="server">
    Protected Sub ddlYear_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs)
        For i As Integer = DateTime.Now.Year - 1 To MyObj.BaseYear Step -1
            TryCast(sender, ListControl).Items.Add(i)
        Next
    End Sub
    
    Protected Sub ddlDivision_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim ddlControl As DropDownList = Me.ddlDivision
        Dim dvManager As New DivisionManager

        ddlControl.DataTextField = "Division"
        ddlControl.DataValueField = "Division"
        ddlControl.DataSource = dvManager.GetAllDivision()
    End Sub
    
</script>

<asp:PlaceHolder ID="pl" runat="server">
    <fieldset style="border-color: #4E333B;">
        <legend>
            <asp:Label ID="lblExcelUpdate" runat="server" meta:resourcekey="lblExcelUpdate"></asp:Label>
        </legend>
        <table>
            <tr>
                <td align="left">
                    &nbsp;&nbsp;<asp:Label ID="lblYear" Font-Bold="true" runat="server" meta:resourcekey="lblYear"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="false" OnDataBinding="ddlYear_DataBinding">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <asp:Label ID="lblDivision" runat="server" meta:resourcekey="lblDivision"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlDivision" runat="server" AutoPostBack="True" OnDataBinding="ddlDivision_DataBinding" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblFile" runat="server" meta:resourcekey="lblFile"></asp:Label>
                </td>
                <td align="left" colspan="3">
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                    <asp:Button ID="btnUpload" CssClass="button" runat="server" meta:resourcekey="btnUpload"
                        ValidationGroup="vtcExcel" />
                    <ajaxToolkit:ConfirmButtonExtender ID="cbeUpload" runat="server" TargetControlID="btnUpload"
                        meta:resourcekey="cbeUpload">
                    </ajaxToolkit:ConfirmButtonExtender>
                    <asp:HyperLink ID="hlinklExcelUpdate" Font-Size="12px" meta:resourcekey="hlinklExcelUpdate"
                        NavigateUrl="~/Download/UploadYTDACTExcel.xls" runat="server"></asp:HyperLink>
                    <asp:ValidationSummary ID="vs1" runat="server" ShowMessageBox="true" ShowSummary="false"
                        ValidationGroup="vtcExcel" />
                </td>
            </tr>
        </table>
    </fieldset>
</asp:PlaceHolder>
<br />
<fieldset id="plUpdateErrorMessage" style="border-color: #4E333B" runat="server">
    <legend class="white2">
        <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:plUpdateErrorMessage.GroupingText%>" />
    </legend>
    <asp:Panel ID="Panel1" runat="server" ScrollBars="Auto" Width="900px">
        <table>
            <tr>
                <td align="center">
                    <My:MyGridView ID="gv" SkinID="pager" Height="100%" runat="server" AutoGenerateColumns="true"
                        AllowPaging="true" meta:resourcekey="gv">
                    </My:MyGridView>
                </td>
            </tr>
        </table>
        &nbsp;
    </asp:Panel>
</fieldset>
